import Home from '@/views/Home.vue'

export const loginRouter = {
  path: '/login',
  name: 'Login',
  meta: {
    title: '登录'
  },
  component: resolve => { require(['@/views/Login.vue'], resolve) }
}
export const homeRouter = {
  path: '/home',
  name: 'Home',
  meta: {
    title: '主页',
    pageName: '主页',
    descript: '宣传页面',
    breadcrumbNavigation: '主页'
  },
  component: resolve => { require(['@/views/Home.vue'], resolve) }
}
export const otherRouter = {
  path: '/',
  name: 'otherRouter',
  component: Home,
  meta: {
    title: '主页',
    pageName: '主页',
    descript: '宣传页面',
    breadcrumbNavigation: '主页'
  }
}
export const appRouter = {
  path: '/',
  name: 'Home',
  meta: {
    title: '主页',
    pageName: '主页',
    descript: '宣传页面',
    breadcrumbNavigation: '主页'
  },
  component: Home,
  children: [
    {
      path: '/sys/user',
      name: 'UserList',
      meta: {
        title: '用户列表',
        pageName: '系统管理--用户列表',
        descript: '',
        breadcrumbNavigation: '用户列表'
      },
      component: resolve => { require(['@/views/system/UserList.vue'], resolve) }
    }
  ]
}

// 所有上面定义的路由都要写在下面的routers里
export const routers = [
  loginRouter,
  homeRouter,
  otherRouter,
  appRouter
]
